<?php

use Dcat\Admin\Admin;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;

Admin::routes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');

    // 系统配置路由
    $router->resource('system-configs', SystemConfigController::class)->only(['index', 'store']);
    // 用户管理
    $router->resource('users', UserController::class);
    // 素材管理
    $router->resource('attachments', AttachmentController::class);
});
